import type { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'Layout',
    redirect: '/home',
    component: () => import('../layouts/MainLayout.vue'),
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('../pages/IndexPage.vue')
      },
      {
        path: '/company',
        name: 'Company',
        component: () => import('../pages/sys/company/Index.vue')
      },
      {
        path: '/companyFileUpload',
        name: 'CompanyFileUpload',
        component: () => import('../pages/sys/company/CompanyUploadDlg.vue')
      },
      {
        path: '/user',
        name: 'User',
        component: () => import('../pages/sys/user/Index.vue')
      },
      {
        path: '/tuple',
        name: 'Tuple',
        component: () => import('../pages/sys/tuple/Index.vue')
      },
      {
        path: '/application',
        name: 'Application',
        component: () => import('../pages/sys/application/Index.vue')
      },
      {
        path: '/project',
        name: 'Project',
        component: () => import('../pages/sca/project/CardIndex.vue')
      },
      {
        path: '/device',
        name: 'Device',
        component: () => import('../pages/sca/device/Index.vue')
      },
      {
        path: '/variable',
        name: 'Variable',
        component: () => import('../pages/sca/variable/Index.vue')
      },
      {
        path: '/page',
        name: 'Page',
        component: () => import('../pages/sca/page/CardIndex.vue')
      },
      {
        path: '/alarm',
        name: 'Alarm',
        component: () => import('../pages/sca/alarm/Index.vue')
      },
      {
        path: '/editor',
        name: 'Editor',
        component: () => import('../pages/uiv/MainEditor.vue')
      }
    ]
  },

  {
    name: 'Login',
    path: '/auth/login',
    component: () => import('pages/auth/Login.vue')
  },

  {
    name: 'View',
    path: '/preview',
    component: () => import('../pages/preview/ViewItem.vue')
  },
  {
    name:'DeviceDataAccept',
    path: '/DeviceDataAccept',
    component: () => import('../pages/data/DeviceDataAccept.vue')
  },
  // Always leave this as last one,
  // but you can also remove it
  {
    path: '/:catchAll(.*)*',
    component: () => import('pages/ErrorNotFound.vue')
  }
  {
    
  }
];

export default routes;
